package cruciverba.ui;

import java.util.Observable;
import java.util.Observer;

import javax.swing.JTextArea;

import cruciverba.model.Verifica;

public class CruciverbaArea extends JTextArea implements Observer{

	/**
	 * 
	 */
	private Verifica verif;
	
	public CruciverbaArea(Verifica verif) {
		super();
		this.verif = verif;
		verif.addObserver(this);
		super.setEditable(false);
	}

	private static final long serialVersionUID = 1L;

	@Override
	public void update(Observable o, Object arg) {
		super.setText(null);
		super.setText(verif.getResultVerifica());
				
	}

}
